package com.fuzhenguo.boltmusic;

import java.util.HashMap;

import android.content.ContentResolver;
import android.content.Context;

/**
 * @author 28100837
 *
 */

public class CategoryManager {

    private HashMap<String, Category> mCateMap = null;
    private short mCountOfCates = 0;
    private static CategoryManager mInstance = null;
    private ContentResolver mContentResolver = null;
    private static Context mContext = null;
    private boolean mIsCustomized;

    private CategoryManager() {
        mCateMap = new HashMap<String, Category>();
        mIsCustomized = false;
    }

    public static CategoryManager getManager(Context context) {
        synchronized (mInstance) {
            if (mInstance == null) {
                mInstance = new CategoryManager();
            }
        }
        mContext = context;
        return mInstance;
    }

    
    /**
     * Generates the {@value mCountOfCates} default categories. 
     * 
     */
    public void setDefaultCategories() {
        // TODO
    }

    
    public boolean addAlbumToCategory(Album album) {
        boolean ret = false;
        //TODO
        
        return ret;
    }
    
    public boolean addCategory(Category category) {
        boolean ret = false;
        //TODO
        
        return ret;
    }
    
    /**
     * Sets the value of mCountOfCates(x). When the count of albums(y) < 5, x = 1 or 2
     * 5 < y <10, x = 3 (increase pace is 1 for 5 albums) 
     * @param countOfCates
     * @return
     */
    private short setCountOfCates(short countOfCates) {
        return 0;
    }
    
}
